package org.zn.mvcbase.response;



import java.util.List;

import org.zn.mvcbase.page.PaginationUtility;

/**  
*
* @Company OBOR 
* @author 周楠
* @Description: 
* @date 2017年10月26日
*
*/
public class JqgridMessage extends MainStatus {


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer page;
	private Integer total;
	private Long records;
	private List<?> rows;
	
	@Deprecated
	private String message;
	

	/**
	 * 
	 */
	public JqgridMessage() {
		// TODO Auto-generated constructor stub
	}
	
	public JqgridMessage(PaginationUtility<?> page,String message) {
		// TODO Auto-generated constructor stub
		
		this.records=page.getTotal();
		this.total=page.getPages();
		this.rows=page.getList();
		this.page=page.getPageNum();
				
	}
	
	
	/**
	 * @param page
	 * @param total
	 * @param records
	 * @param rows
	 */
	public JqgridMessage(Integer page,Integer  total, Long records, List<?> rows) {
		super();
		this.page = page;
		this.total = total;
		this.records = records;
		this.rows = rows;
	}
	
	
	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getTotal() {
		return total;
	}

	public void setTotal(Integer total) {
		this.total = total;
	}

	public Long getRecords() {
		return records;
	}

	public void setRecords(Long records) {
		this.records = records;
	}

	public List<?> getRows() {
		return rows;
	}

	public void setRows(List<?> rows) {
		this.rows = rows;
	}
	

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String getMapperKey() {
		// TODO Auto-generated method stub
		return "jqGrid";
	}

}
